;
(function ($) {
    function colorpick() {
        this.li = $('.list2 li')
        this.span1 = $('.colorblack');
        this.span2 = $('.colorgold');

        this.pic = $('.colorphone');
        this.pic1 = $('.colorphone1');
        this.reok = $('.reok');
        this.descript=$('.descript');
    }

    colorpick.prototype.init = function () {
        var that=this;
        this.li.each(function (index, element) {
            $(element).hover(function () {
                that.reok.eq(index).show();
                that.span1.eq(index).show();
                that.span2.eq(index).show();
                
                that.span1.eq(index).on("click", function () {
                    that.pic.eq(index).show();
                    that.pic1.eq(index).hide();
                    that.reok.eq(index).html("已选：Y69A&nbsp;全网通&nbsp;黑色&nbsp;<i>￥：999.00</i>");
                });
                that.span2.eq(index).on("click", function () {
                    that.pic1.eq(index).show();
                    that.pic.eq(index).hide();
                    that.reok.eq(index).html("已选：Y69A&nbsp;全网通&nbsp;黑色&nbsp;<i>￥：999.00</i>");
                })
            }, function () {
                that.reok.eq(index).hide();
                that.span1.eq(index).hide();
                that.span2.eq(index).hide();
             
            })
        })
    }



    new colorpick().init();

})(jQuery);
